#include <iostream>
#include <sys/types.h>
#include <sys/ipc.h>
#include <sys/shm.h>
#include <stdio.h>

using namespace std;

int main()
{
    key_t key=ftok("pan",315);
    int shmid=shmget(key,4096,IPC_CREAT);

    char* shmaddr=(char*)shmat(shmid,nullptr,0);

    // shmaddr="i am process A";
    while(true)
    {
        cout<<"You say"<<shmaddr<<endl;
    }


    shmdt(shmaddr);

    return 0;
}